import axios from 'axios'
import mconfig from './config'
import { getToken } from '@/utils/auth'
import Cookies from 'js-cookie'
console.log(Cookies.get("Admin-Token"),1)
// axios.defaults.baseURL = 'http://192.168.0.124:60000'; // 配置axios请求的地址

// axios.defaults.baseURL = 'http://192.168.0.124:60000'; // 配置axios请求的地址
axios.defaults.baseURL = mconfig.hosts; // 线上
axios.defaults.headers['Content-Type'] = 'application/json'


// axios.defaults.headers.common['Authorization'] ='Bearer ' + getToken(); // 设置请求头为 Authorization
// axios.defaults.headers.common['Authorization'] ='Bearer ' + getToken(); // 设置请求头为 Authorization
export default axios